package com.hyt.it.ogt.ks.service;

import java.util.Map;
import java.util.concurrent.TimeUnit;

import com.hyt.it.ogt.ks.model.entity.CandidateAnswer;
import com.hyt.it.ogt.ks.model.entity.CandidatePaper;
import com.hyt.it.ogt.ks.model.vo.PaperBigQuestionVO;
import com.hyt.it.ogt.ks.model.vo.paper.PItemDTO;
import com.hyt.it.ogt.ks.model.vo.paper.PTopicDTO;

/**
 *
 *
 * @author liuhh
 * @since 2020-06-17
 */
public interface IPaperService {

    /**
     * 获取整套试卷数据
     */
    void getPaper();

    CandidatePaper getCandidatePaperFromCache(String examId, String candidateId, Integer paperSort);

    CandidatePaper putCandidatePaperFromCache(String examId, String candidateId, Integer paperSort,
                                              Integer timeout, TimeUnit timeUnit);

    CandidateAnswer getItemAnswer(String examId, String candidateId, String itemId, Integer paperSort, String language);

    PItemDTO getItemContent(String examId, String candidateId, String itemId, Integer paperSort, String language);

    PaperBigQuestionVO getItem(String candidateId, String examId, String itemId, Integer paperSort, String language,Integer childItemSort);

    PItemDTO getPItem(String paperId, String paperVersion, String itemId);

    Map<String, PItemDTO> getPaperItemByTopicId(String paperId, String paperVersion, String topicId);

    PTopicDTO getTopic(String paperId, String paperVersion, String topicId);

    /**
     * 获取大题下所有小题数量
     * @param paperId
     * @param paperVersion
     * @param topicId
     * @return
     */
    Integer getItemNumberByTopicId(String paperId, String paperVersion, String topicId);
}
